local skel = fk.CreateSkill {
  name = "emo__juji",
  tags = {Skill.Limited},
}

Fk:loadTranslationTable{
  ["emo__juji"] = "狙击",
  [":emo__juji"] = "限定技，出牌阶段，你可以选择一个点数并选择一名角色，弃置其所有此点数的牌，对其造成等量点伤害。",

  ["#emo__juji"] = "狙击：选择一个点数并狙击一名角色！",

  ["$emo__juji1"] = "在这个世界上没有谁能够审判我!",
  ["$emo__juji2"] = "去你妈的老天爷!",
}

skel:addEffect("active", {
  card_num = 0,
  target_num = 1,
  prompt = "#emo__juji",
  interaction = function()
    return UI.Spin { from = 1, to = 13 }
  end,
  card_filter = Util.FalseFunc,
  target_filter = function (self, _, _, selected)
    return #selected == 0
  end,
  can_use = function(self, player)
    return player:usedSkillTimes(self.name, Player.HistoryGame) == 0
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local to = effect.tos[1]
    local cards = table.filter(to:getCardIds("he"), function (id)
      return Fk:getCardById(id).number == self.interaction.data
    end)
    if #cards > 0 then
      room:throwCard(cards, self.name, to, player)
      if to.dead then return end
      room:damage { from = player, to = to, damage = #cards, skillName = self.name }
    end
  end,
})

return skel
